##
## Makefile for asm in /home/vanet_c//proj-kw/asm
## 
## Made by charles-edouard vanet
## Login   <vanet_c@epitech.net>
## 
## Started on  Thu Dec  6 17:46:02 2012 charles-edouard vanet
## Last update Sat Dec 15 12:36:37 2012 charles-edouard vanet
##

NAME	= asm

SRCS	= main.c \
	check_param.c \
	my_list.c \
	processing.c \
	init.c \
	my_errors.c \
	check_syntax_line.c \
	folder_syntax/syntax_error.c \
	folder_syntax/indirection_too_far.c \
	folder_syntax/label_undefine.c \
	folder_syntax/register_error_label_syntax.c \
	folder_syntax/header_error.c \
	folder_syntax/direct_too_big.c \
	folder_syntax/synt_func/synt_live.c \
	folder_syntax/synt_func/synt_ld.c \
	folder_syntax/synt_func/synt_st.c \
	folder_syntax/synt_func/synt_add.c \
	folder_syntax/synt_func/synt_sub.c \
	folder_syntax/synt_func/synt_and.c \
	folder_syntax/synt_func/synt_or.c \
	folder_syntax/synt_func/synt_xor.c \
	folder_syntax/synt_func/synt_zjmp.c \
	folder_syntax/synt_func/synt_ldi.c \
	folder_syntax/synt_func/synt_sti.c \
	folder_syntax/synt_func/synt_fork.c \
	folder_syntax/synt_func/synt_lld.c \
	folder_syntax/synt_func/synt_lldi.c \
	folder_syntax/synt_func/synt_lfork.c \
	folder_syntax/synt_func/synt_aff.c

OBJS	= $(SRCS:.c=.o)

MY	= cd ../lib/

KORASM	= cd ../lib_kor_asm/

MY_CC	= gcc -o

LDFLAGS	= -L../ -lmy -L../ -lkorasm

CFLAGS	= -g

RM	= rm -rvf

$(NAME):	libmy libkorasm $(OBJS)
	$(MY_CC) $(NAME) $(OBJS) $(LDFLAGS)

libmy:
	$(MY) && $(MAKE)

libkorasm:
	$(KORASM) && $(MAKE)

all:	$(NAME)

clean:
	$(RM) *~
	$(RM) $(OBJS)
	$(RM) *#
	$(MY) && make clean
	$(KORASM) && make clean

fclean: clean
	$(RM) $(NAME)
	$(MY) && make fclean
	$(KORASM) && make fclean

re:	fclean all